<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>物料管理-编辑物料</title>
<link href="__PUBLIC__/admin/css/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="__PUBLIC__/admin/js/jquery.js"></script>

<link href="__PUBLIC__/admin/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/admin/js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/select-ui.min.js"></script>

<link href="__PUBLIC__/validform/Validform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/validform/Validform_v5.3.2.js"></script>
<script type="text/javascript" src="__PUBLIC__/validform/Validform_Datatype.js"></script>
<script type="text/javascript">
$(document).ready(function(e) {
    $("#role").uedSelect({
		width : 345			  
	});
});

function showschool(v){
	if(v==3){ //代理组显示学校选择
		$("#school_info").show();
	}else{
		$("#school_info").hide();
	}
}
</script>
<style>
#schoolinfo {margin-left: 86px;}
#schoolinfo label{width: 30%;}
</style>
</head>

<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="{:U('index/welcome')}">首页</a></li>
			<li><a href="{:U('matter/index')}">物料管理</a></li>
			<li><a href="#">编辑物料</a></li>
		</ul>
    </div>
    
    <div class="formbody">
    
		<div class="formtitle"><span>编辑物料</span></div>

		<form name="myform" id="myform" action="{:U('matter/editmatter',array('mat_id'=>$matter['mat_id']))}" method="post">
			<ul class="forminfo">
				<li><label>物料名</label><input name="info[mat_title]" id="mat_title" type="text" class="dfinput" ajaxurl="{:U('matter/existmatter')}" datatype="*" errormsg="用户名不能为空！" maxlength="20" value="{$matter.mat_title}" /><i class="Validform_checktip"></i></li>
				<li><label>型号规格</label><input name="info[mat_model]" id="mat_model" type="text" class="dfinput" datatype="*" errormsg="型号规格不能为空！" maxlength="50" value="{$matter.mat_model}"/><i class="Validform_checktip"></i></li>
				<li><label>物料级别</label>
					<div class="vocation">
						<select id="role" name="info[mat_level]" datatype="*" errormsg="物料级别不能为空">
							<option value="">选择级别</option>
							<volist name="levelinfo" id="data">
							<option value="{$data.level_id}" <if condition="$data['level_id'] eq $matter['mat_level']">selected</if>>{$data.level_title}</option>
							</volist>
						</select>
					</div>
					<i class="Validform_checktip"></i>
				</li>

				<li><label>&nbsp;</label><input name="loginbtn" type="submit" class="btn" value="确认保存"/></li>
			</ul>
		</form>
    
    </div>

	<script>
	$(function(){
		$("#myform").Validform({
			//tiptype:2
			tiptype:function(msg,o,cssctl){
				var objtip=o.obj.siblings(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}
		});
	}); 
	</script>
</body>

</html>
